package com.cn.file.ha;

import io.netty.channel.Channel;

import java.util.HashSet;
import java.util.Set;

/**
 * 存放slave节点
 */
public class SlaveChannelStore {

    private static Set<Channel> slave_channel = new HashSet<>();

    public static void add(Channel channel) {
        slave_channel.add(channel);
    }

    public static Set<Channel> get() {
        return slave_channel;
    }

    public static void remove(Channel channel) {
        slave_channel.remove(channel);
    }

    public static void clear() {
        slave_channel.clear();
    }

}
